import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import store from './store'
import $axios from "axios";
Vue.config.productionTip = false

Vue.use(ElementUI);
// 1. 每一个发送到后端的请求添加一个/api前缀
$axios.defaults.baseURL="/api"
// 2. 为vue实例扩展一个axios属性对象，用于访问后端
Vue.prototype.axios = $axios

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
